import { PORT1 } from "../config/servicePort";
import Http from "@/api/index";

const baseRoomTypeUrl = PORT1 + "/system/loupan/room_type";

const baseRoomUrl = PORT1 + "/system/loupan/room";

export const createRoomType = (params: any) => {
  return Http.post(baseRoomTypeUrl + "/add", params);
};

export const editRoomType = (params: any) => {
  return Http.put(baseRoomTypeUrl + "/edit", params);
};

export const getRoomTypeList = () => {
  return Http.get(baseRoomTypeUrl + "/list");
};

export const deleteRoomType = (params: any) => {
  return Http.post(baseRoomTypeUrl + "/delete", params);
};

export const createRoom = (params: any) => {
  return Http.post(baseRoomUrl + "/add", params);
};

export const editRoom = (params: any) => {
  return Http.put(baseRoomUrl + "/edit", params);
};

export const getRoomList = (params: any) => {
  return Http.get(baseRoomUrl + "/list", params);
};

export const getRoom = (roomId: any) => {
  return Http.get(baseRoomUrl + "/info", { roomId });
};
